package io.sousou.enums;

import org.hibernate.validator.constraints.NotBlank;

/**
 * 返回值枚举
 * @author allen
 * 2017-10-01 14:23
 */
public enum ResultEnum {

    PRIMARY_SCHOOL(100, "我猜你可能还在上小学"),
    MIDDLE_SCHOOL(101, "你可能在上初中"),
    NOT_BLANk(102,""),
    ;

    private Integer code;

    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
    private void setMsg(String msg){
    	this.msg = msg;
    }
    public static ResultEnum notBlack(String msg){
    	ResultEnum en = ResultEnum.NOT_BLANk;
    	en.setMsg(msg);
    	return en;
    }
}
